<link href="__CDN__/assets/addons/qingdongams/css/common.css?v={$Think.config.site.version}" rel="stylesheet">

<style type="text/css">
	.btn-list {
		position: fixed;
		right: 40px;
	}
	.div-flex {
		display: flex
	}
	.div-flex .form-group {
		margin-right: 50px;
		text-align: center;
		line-height: 25px;
		margin-bottom: 0;
	}
	.tab-pane {
		border: 1px solid #F6F6F6;
	}
	.i-color {
		font-size: 34px;margin-right: 10px;color: #86C3FF;
	}
	.thumbnail {
		display: flow-root;
		width: max-content;
	}
	.thumbnail img {
		width: 50px;
		float: left;
		padding: 5px;
	}
</style>
<style type="text/css">
	.examine_title{
		font-size: 14px;
		color: #333;
		-webkit-box-flex: 1;
		-ms-flex: 1;
		flex: 1;
		display: block;
		height: 30px;
	}
	.examine_box{
		padding-left:20px;
		position: relative;
	}
	.examine_box .newicon{
		position: absolute;
		left:0;
		top:0;
		z-index: 2;
	}
	.examine_box .xian{
		width:1px;
		height:100%;
		background:#e6e6e6;
		position: absolute;
		left:4px;
		top:10px;
		z-index: 1;
	}
	.examine_box .examine_bg{
		position: relative;
		margin-top: 15px;
		border-radius: 4px;
		background-color: #f7f8fa;
		font-size: 12px;
		color: #929293;
		padding: 8px;
		line-height: 18px;
	}
	.rowbox{
		display: flex;
		justify-content: flex-start;
		align-items: center;
	}
	.stafflist{
		width: 75px;text-align: center;float: left;
	}
	.stafflist-right{
		width: 30px;text-align: center;float: left;margin: 0 20px;

	}
	.stafflist-right:last-child{
		display: none;
	}
	.stafflist img{
		width: 40px;
		height: 40px;
		margin: 10px;
		border-radius:50%;
	}
</style>
<div class="panel panel-default panel-intro">
	<input type="hidden" name="ids" id="ids" value="{$ids}"/>
	<div class="div-flex">
		<i class="fa fa-reorder i-color"></i>
		<div style="line-height: 35px"><b>{$row.title}</b>（{$row.workorder_type}）{switch name="row.check_status"}
			{case value="0"}<b class="text-success">(审核中)</b>{/case}
			{case value="1"}<b class="text-success">(审核中)</b>{/case}
			{case value="2"}<b class="text-warning">(审核通过)</b>{/case}
			{case value="3"}<b class="text-danger">(审核拒绝)</b>{/case}
			{case value="4"}<b class="text-danger">(撤销审批)</b>{/case}
			{default /}
			{/switch}</div>
		<div class="btn-list" style="z-index: 999">
			{if condition="isset($flow.is_check) && $flow.is_check"}
			{eq name="flow.is_check" value="1"}
			<a class="btn btn-success btn-dialog" data-area="" data-shade="0.3"
			   data-url="qingdongams/examine/examine_record/examine?relation_type=workorder&relation_id={$ids}&status=1"
			   data-title="审核通过" >审核通过</a>
			<a class="btn btn-danger btn-dialog" data-area="" data-shade="0.3"
			   data-url="qingdongams/examine/examine_record/examine?relation_type=workorder&relation_id={$ids}&status=2"
			   data-title="审核拒绝" >审核拒绝</a>
			{/eq}
			{/if}
			{notin name="$row.status" value="3,9"}
			<a class="btn btn-info btn-add-log">新建跟进</a>
			<a class="btn btn-info btn-change">转派工单</a>
			<a class="btn btn-info btn-edit">编辑工单</a>
			{/notin}

			{eq name="$row.workorder_type" value="设计工单" }
			{notin name="$row.status" value="3,9"}
			<a class="btn btn-info btn-design-success">设计成功</a>
			<a class="btn btn-info btn-design-error">设计失败</a>
			{/notin}
			{/eq}
			{in name="$row.workorder_type" value="产品发货,配件配送" }
				{notin name="$row.status" value="3,9"}
				{eq name="$row.status" value="1" }
				<a class="btn btn-info btn-accept">接受工单</a>
				{/eq}
				{neq name="$row.status" value="1"}
				<a class="btn btn-info btn-product-number">填写配送信息</a>
				{/neq}
				{eq name="$row.is_operation_logistics" value="1"}
				<a class="btn btn-info btn-add-logistics">填写物流信息</a>
				{/eq}
				{eq name="$row.process" value="3"}
				<a class="btn btn-info btn-complete">已到货</a>
				{/eq}
				{/notin}

				{if condition="$row['status'] == 3 && empty($row['receipt_date'])"}
				<a class="btn btn-info btn-receipt">填写回执单</a>
				{/if}
			{/in}
			{eq name="$row.workorder_type" value="返厂维修" }
			{notin name="$row.status" value="3,9"}


			{if condition="$row['process'] == 1 || $row['process'] == 6 "}
			<a class="btn btn-info btn-repair-result">填写维修结果</a>
			{/if}
			{if condition="$row['process'] == 1"}
			<a class="btn btn-info btn-product-number">填写配送信息</a>
			{/if}
			{eq name="$row.process" value="8"}
			<a class="btn btn-info btn-complete">已到货</a>
			{/eq}
			{if condition="$row['process'] == 4"}
			<a class="btn btn-info btn-pay-order">去结算</a>
			{/if}
			{if condition="$row['process'] == 2"}
			<a class="btn btn-info btn-continue-repart" data-status="1" >继续维修</a>
			<a class="btn btn-info btn-continue-repart" data-status="9">取消维修</a>
			{/if}
			{if condition="$row['process'] == 3"}
			<a class="btn btn-info btn-enter-money">录入费用</a>
			{/if}
			{if condition="$row['process'] == 7"}
			<a class="btn btn-info btn-discount">填写优惠金额</a>
			{/if}
			{if condition="$row['process'] == 5"}
			<a class="btn btn-info btn-add-logistics">填写物流信息</a>
			{/if}
			{/notin}

			{/eq}

			{eq name="$row.workorder_type" value="品质异常单" }
			{notin name="$row.status" value="3,9"}
			{if condition="$row['status'] != 3"}
			<a class="btn btn-info btn-write">填写异常分析</a>
			{/if}
			{/notin}
			{/eq}
			{eq name="$row.workorder_type" value="电话售后" }
			{notin name="$row.status" value="3,9"}
			{if condition="$row['process'] < 2"}
			<a class="btn btn-info btn-complete-mobile">完成工单</a>
			{/if}
			{if condition="$row['process'] == 3"}
			<a class="btn btn-info btn-enter-money">录入费用</a>
			{/if}
			{if condition="$row['process'] == 7"}
			<a class="btn btn-info btn-discount">填写优惠金额</a>
			{/if}
			{if condition="$row['process'] == 4"}
			<a class="btn btn-info btn-pay-order">去结算</a>
			{/if}
			{/notin}
			{/eq}

			{notin name="$row.status" value="3,9"}
			{in name="$row.workorder_type" value="设计工单,上门维修" }
			<a class="btn btn-info btn-assist">邀请协作</a>
			{/in}
			<a class="btn btn-danger btn-cancel">终止工单</a>
			{/notin}
		</div>
	</div>
	{if condition="isset($flow) && $flow"}
	{if condition="$flow.status == 1"}
	<div class="div-flex">
		<div class="form-group col-sm-10">

			<blockquote style="padding: 2px 10px;text-align: left">
				<p>审核信息 <span class="label label-danger">固定审批流</span></p>
			</blockquote>
			<div  style="text-align: left">
				<a href="javascript:void(0)" data-toggle="popover"
				   data-content="
                   <p class='examine_title'>审批流程</p>
                   {foreach name='$examine_record' item='examine_r'}
                {if condition='$examine_r.status == 0'}
                {elseif condition='$examine_r.status == 1'}
                    <div class='examine_box'>
                        <i class='fa fa-check-circle text-success newicon'></i>
                        <div class='xian'></div>
                        <p><span class='text-muted'>{$examine_r.check_time}</span></p>
                        <p>  {$examine_r.check_staff.name} <span class='text-muted'>通过了此申请</span></p>
                        {if condition='$examine_r.content'}<p class='examine_bg'>  {$examine_r.content}</p>{/if}
                    </div>
                {elseif condition='$examine_r.status == 2'}
                  <div class='examine_box'>
                        <i class='fa fa-window-close text-red newicon'></i>
                        <div class='xian'></div>
                        <p><span class='text-muted'>{$examine_r.check_time}</span></p>
                        <p>  {$examine_r.check_staff.name} <span class='text-muted'>拒绝了此申请</span></p>
                        {if condition='$examine_r.content'}<p class='examine_bg'>  {$examine_r.content}</p>{/if}
                  </div>
                {else/}

                  <div class='examine_box'>
                        <i class='fa fa-window-close text-red newicon'></i>
                        <div class='xian'></div>
                        <p><span class='text-muted'>{$examine_r.check_time}</span></p>
                        <p>  {$examine_r.check_staff.name} <span class='text-muted'>撤回了此申请</span></p>
                        {if condition='$examine_r.content'}<p class='examine_bg'>  {$examine_r.content}</p>{/if}
                  </div>
                {/if}
                {/foreach}" data-html="true">查看审批历史</a>
			</div>
			<div class="row rowbox" style="margin-left: 20px">
				{foreach name="$flow.stepList" item="val"}
				<div class="stafflist"  data-container="body" data-toggle="popover" data-placement="bottom" data-content="{foreach name='$val.stafflist' item='sf'}
                {if condition='$sf.examine_reord.status == 0'}
                <p><i class='fa fa-clock-o text-red'></i> {$sf.name} 待审核此申请</p>
                {elseif condition='$sf.examine_reord.status == 1'}
                <p><i class='fa fa-check-circle text-success'></i> {$sf.examine_reord.check_time}</p>
                <p>{$sf.name} 通过此申请</p>
                {elseif condition='$sf.examine_reord.status == 2'}
                <p><i class='fa fa-window-close text-red'></i> {$sf.examine_reord.check_time}</p>
                <p>{$sf.name} 拒绝此申请</p>
                {else/}
                <p><i class='fa fa-mail-reply text-red'></i> {$sf.name} 已撤销</p>
                {/if}
                {/foreach}" data-html="true">


					<img src="/assets/addons/qingdongams/img/avatar.png" class="img-circle">
					{if condition="$val.status == 3"}
					<span class="text-muted">发起人主管</span>
					{elseif condition="$val.status == 2"/}
					<span class="text-muted">{:count($val.stafflist)}人并签</span>
					{else/}
					<span class="text-muted">{:count($val.stafflist)}人或签</span>
					{/if}

					{if condition="$val.order_id < $flow.order_id"}
					<p><span><i class="fa fa-check-circle text-success"></i> 审核通过</span></p>
					{else/}
					{if condition="$row.check_status == 3"}
					<p> <span><i class="fa fa-window-close text-red"></i> 审核拒绝</span></p>
					{else/}
					<p><span><i class="fa fa-clock-o text-red"></i> 待审核</span></p>
					{/if}
					{/if}

				</div>

				<div class="stafflist-right">
					<i class="fa fa-angle-right" style="color: #ccc;margin: 0 16px;font-size: 20px;font-weight: 600;"></i>
				</div>

				{/foreach}
			</div>
		</div>
	</div>
	{else/}
	<div class="div-flex">
		<div class="form-group col-sm-10">
			<blockquote style="padding: 2px 10px;text-align: left">
				<p>审核信息 <span class="label label-danger">发起人自选</span></p>
			</blockquote>
			<div  style="text-align: left">
				<a href="javascript:void(0)" data-toggle="popover"
				   data-content="
                   <p class='examine_title'>审批流程</p>
                   {foreach name='$examine_record' item='examine_r'}
                {if condition='$examine_r.status == 0'}
                {elseif condition='$examine_r.status == 1'}
                    <div class='examine_box'>
                        <i class='fa fa-check-circle text-success newicon'></i>
                        <div class='xian'></div>
                        <p><span class='text-muted'>{$examine_r.check_time}</span></p>
                        <p>  {$examine_r.check_staff.name} <span class='text-muted'>通过了此申请</span></p>
                        {if condition='$examine_r.content'}<p class='examine_bg'>  {$examine_r.content}</p>{/if}
                    </div>
                {elseif condition='$examine_r.status == 2'}
                  <div class='examine_box'>
                        <i class='fa fa-window-close text-red newicon'></i>
                        <div class='xian'></div>
                        <p><span class='text-muted'>{$examine_r.check_time}</span></p>
                        <p>  {$examine_r.check_staff.name} <span class='text-muted'>拒绝了此申请</span></p>
                        {if condition='$examine_r.content'}<p class='examine_bg'>  {$examine_r.content}</p>{/if}
                  </div>
                {else/}

                  <div class='examine_box'>
                        <i class='fa fa-window-close text-red newicon'></i>
                        <div class='xian'></div>
                        <p><span class='text-muted'>{$examine_r.check_time}</span></p>
                        <p>  {$examine_r.check_staff.name} <span class='text-muted'>撤回了此申请</span></p>
                        {if condition='$examine_r.content'}<p class='examine_bg'>  {$examine_r.content}</p>{/if}
                  </div>
                {/if}
                {/foreach}" data-html="true">查看审批历史</a>
			</div>
			<div class="row rowbox" style="margin-left: 20px">

				{foreach name="$flow.stepList.0.stafflist" item="val"}
				<div class="stafflist">
					<img src="{$val.img}" class="img-circle">
					<span class="text-muted">{$val.name}</span>
					{if condition="$val.examine_reord.status == 0"}
					<p><span><i class="fa fa-clock-o text-red"></i> 待审核</span></p>
					{elseif condition="$val.examine_reord.status == 1"}
					<p><span><i class="fa fa-check-circle text-success"></i> 审核通过</span></p>
					{else/}
					<p> <span><i class="fa fa-window-close text-red"></i> 审核拒绝</span></p>
					{/if}
				</div>

				<div class="stafflist-right">
					<i class="fa fa-angle-right" style="color: #ccc;margin: 0 16px;font-size: 20px;font-weight: 600;"></i>
				</div>

				{/foreach}
			</div>
		</div>
	</div>
	{/if}
	{/if}
	<div class="div-flex" style="margin-top: 20px">
		<div class="form-group">
			<span class="text-muted">工单类型</span>
			<p>{$row.workorder_type}</p>
		</div>

		<div class="form-group">
			<span class="text-muted">工单状态</span>
			{switch name="row.status"}
			{case value="0"}<p class="text-success">待分配</p>{/case}
			{case value="1"}<p class="text-success">待处理</p>{/case}
			{case value="2"}<p class="text-primary">处理中</p>{/case}
			{case value="3"}<p class="text-success">已完成</p>{/case}
			{case value="9"}<p class="text-red">终止工单</p>{/case}
			{default /}
			{/switch}
		</div>
		<div class="form-group">
			<span class="text-muted">工单进程</span>
			{switch name="row.process"}
			{case value="0"}<p class="text-success">已提交</p>{/case}
			{case value="1"}<p class="text-success">备货中</p>{/case}
			{case value="2"}<p class="text-primary">备货完成</p>{/case}
			{case value="3"}<p class="text-success">到访/录入物流信息</p>{/case}
			{case value="9"}<p class="text-red">已完成</p>{/case}
			{default /}
			{/switch}
		</div>

		<div class="form-group">
			<span class="text-muted">负责人</span>
			<p>{$row.owner_staff.name}</p>
		</div>
		<div class="form-group">
			<span class="text-muted">创建时间</span>
			<p>{$row.createtime}</p>
		</div>
	</div>


	<div>

		<ul class="nav nav-tabs" role="tablist">
			<li role="presentation" class="active"><a href="#basic" aria-controls="home" role="tab" data-toggle="tab">工单信息</a></li>
			<li role="presentation"><a href="#status" aria-controls="profile" role="tab" data-toggle="tab">工单进度</a></li>

			{in name="$row.workorder_type" value="上门维修,配件配送" }
			<li role="presentation"><a href="#cost" aria-controls="messages" role="tab" data-toggle="tab">费用信息</a></li>
			{/in}
			{in name="$row.workorder_type" value="产品发货,配件配送" }
			<li role="presentation"><a href="#logitic" aria-controls="messages" role="tab" data-toggle="tab">物流信息</a></li>
			{/in}
			{in name="$row.workorder_type" value="设计工单,返厂维修" }
			<li role="presentation"><a href="#event" aria-controls="messages" role="tab" data-toggle="tab">协助任务</a></li>
			{/in}

			{in name="$row.workorder_type" value="上门安装,上门维修,配件安装" }
			<li role="presentation"><a href="#visit" aria-controls="messages" role="tab" data-toggle="tab">回访信息</a></li>
			{/in}
			{in name="$row.workorder_type" value="上门维修" }
			<li role="presentation"><a href="#record" aria-controls="messages" role="tab" data-toggle="tab">操作记录</a></li>
			{/in}

		</ul>

		<div class="tab-content" style="">
			<div role="tabpanel" class="tab-pane fade panel-body form-horizontal active in " id="basic">

				{notempty name="$row.customer_product"}
				<div class="form-group">
					<div class="alert alert-warning-light no-margin">
						产品信息
					</div>
				</div>
				<div class="form-group">
					<div class="col-xs-12 col-sm-12">
						<table class="table table-striped table-bordered table-hover table-nowrap"
							   width="100%">
							<thead>
							<tr>
								<th>产品图片</th>
								<th>产品名称</th>
								<th>产品编码</th>
								<th>设备状态</th>
								<th>购买时间</th>
							</tr>
							</thead>
							<tbody>

							{foreach name="row.customer_product" item="val"}
							<tr>
								<td>
									<img data-tips-image src="{$val.product.img|default="-"}" class="img-sm img-center" width="100">

								</td>
								<td>{$val.product.name|default="-"}</td>
								<td>{$val.number}</td>
								<td>{$val.status}</td>
								<td>{$val.pay_date}</td>
							</tr>
							{/foreach}
							</tbody>
						</table>
					</div>

				</div>
				{/notempty}
				{eq name="$row.workorder_type" value="设计工单"}
				{include file="../application/admin/view/qingdongams/workorder/workorder/detail_template/detail.html"/}
				{/eq}

				{eq name="$row.workorder_type" value="生产工单"}
				{include file="../application/admin/view/qingdongams/workorder/workorder/detail_template/detail1.html"/}
				{/eq}

				{eq name="$row.workorder_type" value="产品发货"}
				{include file="../application/admin/view/qingdongams/workorder/workorder/detail_template/detail2.html"/}
				{/eq}


				{eq name="$row.workorder_type" value="配件配送"}
				{include file="../application/admin/view/qingdongams/workorder/workorder/detail_template/detail8.html"/}
				{/eq}

				{eq name="$row.workorder_type" value="上门安装"}
				{include file="../application/admin/view/qingdongams/workorder/workorder/detail_template/detail3.html"/}
				{/eq}
				{eq name="$row.workorder_type" value="配件安装"}
				{include file="../application/admin/view/qingdongams/workorder/workorder/detail_template/detail3.html"/}
				{/eq}
				{eq name="$row.workorder_type" value="上门维修"}
				{include file="../application/admin/view/qingdongams/workorder/workorder/detail_template/detail4.html"/}
				{/eq}
				{eq name="$row.workorder_type" value="返厂维修"}
				{include file="../application/admin/view/qingdongams/workorder/workorder/detail_template/detail5.html"/}
				{/eq}
				{eq name="$row.workorder_type" value="品质异常单"}
				{include file="../application/admin/view/qingdongams/workorder/workorder/detail_template/detail6.html"/}
				{/eq}
				{eq name="$row.workorder_type" value="电话售后"}
				{include file="../application/admin/view/qingdongams/workorder/workorder/detail_template/detail7.html"/}
				{/eq}
				<div class="form-group">
					<div class="alert alert-warning-light no-margin">
						时间信息
					</div>
				</div>
				<div class="form-group">
					<div class="col-xs-6 col-sm-5">
						<div class="form-group col-sm-10">
							<span class="text-muted">接收工单时间:</span>
							{$row.accept_time}
						</div>
					</div>
					<div class="col-xs-6 col-sm-5">
						<div class="form-group col-sm-10">
							<span class="text-muted">提出工单时间:</span>
							{$row.createtime}
						</div>
					</div>
					<div class="col-xs-6 col-sm-5">
						<div class="form-group col-sm-10">
							<span class="text-muted">开始处理时间:</span>
							{$row.start_time}
						</div>
					</div>
					<div class="col-xs-6 col-sm-5">
						<div class="form-group col-sm-10">
							<span class="text-muted">结束时间:</span>
							{$row.end_time}
						</div>
					</div>
					<div class="col-xs-6 col-sm-5">
						<div class="form-group col-sm-10">
							<span class="text-muted">处理结果:</span>
							{$row.results}
						</div>
					</div>
				</div>
			</div>
			<div role="tabpanel" class="tab-pane fade panel-body form-horizontal" id="status">
				{empty name="records"}
				{else/}
				{foreach name="records" item="val" }
				<div class="div-record">
					<div class="div-flex">
						<i class="fa fa-user-circle-o i-color"></i>
						<div><b>{$val.staff.name}{if condition="$val.staff.post"}（{$val.staff.post}）{/if}</b> <span class="label label-success">{$val.relation_process}</span>
							<p class="text-muted">{$val.createtime}</p></div>
					</div>
					<div class="well">
						{$val.content}
						{if condition="$val.file_ids"}
						<div class="thumbnail">
							{foreach name="$val.file_ids" item="ves"}
							<a href="{$ves}" target="_blank"><img data-tips-image src="{$ves}" alt=""></a>
							{/foreach}
						</div>
						{/if}
					</div>
				</div>
				{/foreach}
				{/empty}
				<div class="div-record">
					<div class="div-flex">
						<i class="fa fa-user-circle-o i-color"></i>
						{eq name="row.create_type" value="1"}
						<div><b>{$row.create_staff.name}</b>
							<p class="text-muted">{$row.createtime}</p></div>
						{else/}
						<div><b>{$row.create_person.account}</b> <span class="label label-success">客户</span>
							<p class="text-muted">{$row.createtime}</p></div>
						{/eq}
					</div>
				</div>
				<div class="well">
					创建工单
				</div>
			</div>

			<div role="tabpanel" class="tab-pane fade panel-body form-horizontal" id="cost">
				<div id="consume_toolbar" class="toolbar">
					{:build_toolbar('refresh')}
					<a class="btn btn-success btn-dialog"
					   data-url="qingdongams/customer/consume/add?customer_id={$row.customer_id}&relation_type=workorder&relation_id={$row.id}" data-title="新建费用" data-refresh="true"data-area=["90%","90%"] >新建费用</a>
				</div>
				<table id="consume" class="table table-striped table-bordered table-hover table-nowrap"
					   width="100%">
				</table>

			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="logitic">
				{empty name="logistics"}
				<div class="center-block">
					暂无相关数据!
				</div>

				{else/}
				{foreach name="$logistics" item="logis"}
				<div class="form-group" style="padding: 20px;border: 1px solid #ddd">
					<div class="div-flex" style="margin-bottom: 10px;">
						<div>
							<p>发货时间：{$logis.createtime}
								<button type="button" class="btn btn-info btn-xs btn-edit-logistics "
										data-id="{$logis.id}" >编辑物流信息</button>
							</p>
							<p>物流公司：{$logis.company}</p>
							<p>物流编号：<span class="label label-success">{$logis.number}</span></p>
							<p>附件：</p>
							<div class="thumbnail">
								{foreach name="$logis.file_ids" item="f"}
								<a href="{$f.url}" target="_blank"><img src="{$f.url}" alt=""></a>
								{/foreach}
							</div>
						</div>
					</div>
					{foreach name="$logis.content" item="val" key="key"}
					<div class="div-record">

						<div class="well">
							{$val.text}<br/>
							{$val.desc}
						</div>
					</div>
					{present name="$logis.content[$key+1]"}
					<div style="margin-bottom:10px;">
						<i class="fa fa-long-arrow-up i-color" style="font-size:20px;"></i>
					</div>
					{/present}
					{/foreach}
				</div>

				{/foreach}

				{/empty}

			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="event">
				<div class="form-group">
					<div class="alert alert-warning-light no-margin">
						协助任务
					</div>
				</div>
				{empty name="assist_task"}
				<div class="center-block">
					暂无相关数据!
				</div>

				{else/}
				{foreach name="$assist_task" item="assist"}
				<div class="form-group" style="padding: 20px;border: 1px solid #ddd">
					<div class="div-flex" style="margin-bottom: 10px;">
						<div>
							<p>邀请的协助人：<img src="{$assist.staff.img}" class="img-circle" width="40">{$assist.staff.name}

								{neq name="$row.status" value="3"}
								<button type="button" class="btn btn-info btn-xs btn-assist-comment"
										data-id="{$assist.id}" >评论</button>
								{/neq}
							</p>
							<p>备注：{$assist.remark}</p>
							<p>邀请协助时间：{$assist.createtime}</p>

						</div>
					</div>
					{foreach name="$assist.comments" item="val" key="key"}
					<div class="div-record">

						<div class="well">
							<p><img src="{$val.staff.img}" class="img-circle" width="40"><b>{$val.staff.name}</b> <span style="margin-left: 100px">{$val.createtime}</span></p>
							<p>评论内容：<b>{$val.content}</b></p>
							附件:
							<div class="thumbnail">
								{foreach name="$val.file_ids" item="img" }
								<a href="{$img}" target="_blank"> <img src="{$img}" class=""></a>
								{/foreach}
							</div>
						</div>
					</div>
					{/foreach}
				</div>

				{/foreach}

				{/empty}


			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="visit">
				{empty name="$row.visit"}
				<div class="center-block">
					暂无相关数据!
				</div>

				{else/}
				<div class="form-group">
					<div class="alert alert-warning-light no-margin">
						回访信息
					</div>
				</div>
				<div class="form-group">
					<div class="col-xs-12 col-sm-12">
						<div class="form-group col-sm-10">
							<span class="text-muted">回访时间:</span>
							{$row.visit.visit_time}
						</div>
					</div>
					<div class="col-xs-6 col-sm-5">
						<div class="form-group col-sm-10">
							<span class="text-muted">回访意见评分:</span>
							{for start="0" end="$row.visit.opinion_score"}
							<i class="fa fa-star text-warning"></i>
							{/for}
						</div>
					</div>
					<div class="col-xs-6 col-sm-5">
						<div class="form-group col-sm-10">
							<span class="text-muted">回访意见:</span>
							{$row.visit.visit_opinion}
						</div>
					</div>
					<div class="col-xs-6 col-sm-5">
						<div class="form-group col-sm-10">
							<span class="text-muted">服务态度评分:</span>
							{for start="0" end="$row.visit.service_score"}
							<i class="fa fa-star text-warning"></i>
							{/for}
						</div>
					</div>
					<div class="col-xs-6 col-sm-5">
						<div class="form-group col-sm-10">
							<span class="text-muted">服务态度:</span>
							{$row.visit.visit_service}
						</div>
					</div>
					<div class="col-xs-6 col-sm-5">
						<div class="form-group col-sm-10">
							<span class="text-muted">技术水平评分:</span>
							{for start="0" end="$row.visit.skill_score"}
							<i class="fa fa-star text-warning"></i>
							{/for}
						</div>
					</div>
					<div class="col-xs-6 col-sm-5">
						<div class="form-group col-sm-10">
							<span class="text-muted">技术水平:</span>
							{$row.visit.visit_skill}
						</div>
					</div>
					<div class="col-xs-6 col-sm-5">
						<div class="form-group col-sm-10">
							<span class="text-muted">备注:</span>
							{$row.visit.visit_desc}
						</div>
					</div>
				</div>

				{/empty}
			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="record">
				{empty name="operations"}
				<div class="center-block">
					暂无相关数据!
				</div>

				{else/}
				{foreach name="operations" item="val"}
				<ul class="list-group">
					<li class="list-group-item">
						<span class="badge" style="margin-left: 20px">{$val.createtime}</span>
						{eq name="val.operation_type" value="1" }
						<span class="label label-success">{$val.staff.name}</span>
						{else/}
						<span class="label label-success">管理员</span>
						{/eq}
						{$val.content}
					</li>
				</ul>
				{/foreach}
				{/empty}
			</div>

		</div>

	</div>
</div>